// Copyright 2007 the original author or authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package lichen.services;

/**
 * 系统所需要的一写编码.
 * @author jcai
 * @version $Revision: 191 $
 * @since 0.0.3
 */
public interface Encoder {

	/**
	 * 对用户的密码进行编码.
	 * @param plainPassword 明文密码.
	 * @return 加密后的密码.
	 * @since 0.0.3
	 */
	public String encodPassword(String plainPassword);
	/**
	 * 对url进行编码
	 * @param planUrl 明文的url.
	 * @return 加密后的url.
	 * @since 0.0.3
	 */
	public String encodUrl(String planUrl);
	/**
	 * 对url进行解密.
	 * @param securedUrl 加密后的url.
	 * @return 明文url.
	 * @since 0.0.3
	 */
	public String decodUrl(String securedUrl);
}
